{	Problem: http://codeforces.ru/problemset/problem/26/A
	Verdict: Accepted

}
var i,n,cur,c,j,res:longint; a:array[1..1001] of longint; p:array[1..3001] of byte;
begin
readln(n);
fillchar(p,sizeof(p),0);
p[1]:=2;
cur:=0;
for i:=2 to n do begin
if p[i]=0 then begin
  p[i]:=1;
  inc(cur);
  a[cur]:=i;
  j:=i*2;
  while j<=n do begin
    p[j]:=2;
    inc(j,i);
  end;
end;
end;
res:=0;
for i:=1 to n do begin
  c:=0;
  j:=1;
  while (a[j]<=n div 2+1) and (j<=cur) do begin
    if i mod a[j]=0 then begin
      inc(c);
    end;
    inc(j);
  end;
  if c=2 then inc(res);
end;
writeln(res);
end.
